Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS and OS X library dependencies #506

Merged
merged 2 commits into from
Oct 14, 2015

Conversation

brunobowden
Copy link
Contributor

  • separate iOS and OS X libraries for j2objc
  • separate iOS and OS X libraries built libraries
  • min deployment target (default): iOS (8.3), OS X (10.8) & watchOS (2.0)
  • Standardize buildType on uppercase ‘Debug’ and ‘Release’
  • Link to ExceptionHandling library only on OS X

Fixes #488

@brunobowden
Copy link
Contributor Author

@advayDev1 - do you know what line is needed for the podspec? I believe it's vendored_libraries. Are you using an OS X build at the moment? If you have an example, it would be helpful to submit it.

String libDirIosDebug = new File(getDestLibDirFile(), '/iosDebug').absolutePath
String libDirIosRelease = new File(getDestLibDirFile(), '/iosRelease').absolutePath
String libDirOsxDebug = new File(getDestLibDirFile(), '/x86_64Debug').absolutePath
String libDirOsxRelease = new File(getDestLibDirFile(), '/x86_64Release').absolutePath
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm having second thoughts about the ordering here.
Does absolutePath function before the directory is created? I thought the FS actually resolves the path?

Until the AssembleLibrariesTask has run, j2objcOutputs/lib/BLAH is never created. Does this work for you after a ./gradlew clean then ./gradlew build?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ordering is fine. The absolutePath is resolved internally without referencing the FS. I can run j2objcPodspec and it happily refers to a non-existent directory. Then after running the full build, it now refers to a directory that exists. Indeed, the clean and then build is enforced by the run-test.sh script.

- separate iOS and OS X libraries for j2objc
- separate iOS and OS X libraries built libraries
- min deployment target (default): iOS (8.3), OS X (10.8) & watchOS (2.0)
- Standardize buildType on uppercase ‘Debug’ and ‘Release’
- Link to ExceptionHandling library only on OS X

Fixes j2objc-contrib#488
@brunobowden
Copy link
Contributor Author

@advayDev1 - I've reworked this to add the deployment targets for iOS, OS X and watchOS. I'm going to try and setup a "allPlatforms" test that builds on all the platforms. What is the j2objcConfig to add the bitcode build? Given that this is only partially working, please review as is and then I'll work on a separate PR for the platform builds.

@@ -60,6 +60,14 @@ class Utils {
}
}

static void validateVersion(String version, String type) {
// Requires at least a major and minor version number
Matcher versionMatcher = (version =~ /^[0-9]*(\.[0-9]+)+$/)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this prohibits -rc1, .beta, etc.
we know that won't happen?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've renamed it to validateNumericVersion and shifted it from Utils to PodspecTask, chaning it from an exception to a warning. I've never seen an Apple OS with a non numeric identifier but can't definitively confirm that there won't ever be one.

@advayDev1
Copy link
Contributor

Build is failing due to the change re: case - see comments above. LGTM after that.

Unfortunately I don't use bitcode nor do I know much about it.
If you need an extra compiler arg: j2objcConfig.extraObjcCompilerArgs
linker: j2objcConfig.extraLinkerArgs

brunobowden added a commit that referenced this pull request Oct 14, 2015
iOS and OS X library dependencies
@brunobowden brunobowden merged commit 9758f8c into j2objc-contrib:master Oct 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants